<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome_ctr extends CI_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -  
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in 
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		
		$this->load->model('welcome_mdl'); // load the file welcome_mdl.php
		$data['records'] = $this->welcome_mdl->filtera(); // call the method filtera inside the class welcome_mdl
		$this->load->view('welcome_vew',$data);  // send the result from the model to the view 
	}
	public function method_go()
	{
		$this->load->view('go.php');  // show the view go
	}
	
	public function login()
	{
		$this->load->view('login_vew');  // show the view go
	}
	
	public function pdf()
	{
     $this->load->helper(array('dompdf', 'file'));
     // page info here, db calls, etc.     
     $html = $this->load->view('go.php',NULL, true);
     pdf_create($html, 'filename');
     //or
     //$data = pdf_create($html, '', false);
     //write_file('name', $data);
     //if you want to write it to disk and/or send it as an attachment    
	}
	function pdf2()
{
     $this->load->helper(array('dompdf', 'file'));
     // page info here, db calls, etc.     
     $html = $this->load->view('convention_detaille_imprimer_vew', true);
    // pdf_create($html, 'filename');
     //or
     $data = pdf_create($html, '', false);
     write_file('name', $data);
     //if you want to write it to disk and/or send it as an attachment    
}
	
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */